<template>
	<view>
		<view class="connectOrderList" :style="{width:width}">
			<view class="bankCard" :style="{height:height}" v-for="(item,index) in data">
				<view class="bank-img">
					<image :src="item.activity_img" mode=""></image>
				</view>
				<view class="bank-conten">
					<view class="bank-title">
						{{item.activity_name}}
					</view>
					<view class="map bgTheme" @click="onClick(item.id)">
						{{btnTitle}}
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		// 0是我要订位置，1是活动发布，2是项目发布
		name:"doings",
		props:{
			dataList: {
				type: Array,
				default: () => []
			},
			height:{
				type: String,
				default: "180rpx"
			},
			btnTitle:{
				type: String,
				default: "报名参加"
			},
			type:{
				type: Number,
				default: 0
			},
			width:{
				type: String,
				default: "94.5%"
			},
			params:{},
			data:{
				type: Array,
				default: () => []
			}
		},
		data() {
			return {
				
			};
		},
		created() {
			console.log("-----------------------------------")
			console.log(this.dataList)
			console.log(this.params)
		},
		methods:{
			submit(index){
				// console.log(this.userInfo[index])/
				
				switch(this.type){
					case 0 : this.$emit("orderSubmits",this.userInfo[index]);break;
					case 1 : this.$emit("moveSubmits",this.userInfo[index]);break;
					case 2 : this.$emit("sproJectSubmits",this.userInfo[index]);break;
					default : this.$emit("orderSubmits",this.userInfo[index]);break;
				}
			},
			onClick(e) {
				console.log(e)
				uni.navigateTo({
					url:'/activity/operation/details?id='+e
				})
			}
		}
	}
</script>

<style lang="less">
	.connectOrderList{
		margin: 0 auto;
	}
.bankCard{
		width: 100%;
		margin: 3% 0;
		border-radius: 25rpx;
		display: flex;
		background-color: #FFFFFF;
		// height: 180rpx;
		padding: 0 10rpx;
		justify-content: space-around;
		align-items: center;
		box-shadow: 0 0 4rpx 1rpx #eaeaea;
		.bank-img{
			width: 28%;
			height: 80%;
			border-radius: 20rpx;
			image{
				width: 100%;
				height: 100%;
			}
		}
		.bank-conten{
			width: 68%;
			height: 80%;
			padding-top:10rpx;
			padding-right: 10rpx;
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			.bank-title{
				font-size: 1.2rem;
			}
			.map{
				width: 180rpx;
				height: 55rpx;
				font-size: 25rpx;
				border-radius: 60rpx;
				// background-color: #994275;
				display: flex;
				align-items: center;
				justify-content: center;
				color: #FFFFFF;
				align-self: flex-end;
			}
		}
	}
</style>
